<?php

declare (strict_types=1);
namespace App\Model;

use Hyperf\DbConnection\Model\Model;
/**
 * @property int $teacher_id 
 * @property string $username 
 * @property int $type 
 * @property string $content 
 */
class TeacherCredential extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'teacher_credential';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['teacher_id' => 'integer', 'type' => 'integer'];

    public $timestamps = false;

    protected $primaryKey = "username";

    public function teacher(){
        return $this->hasOne(Teacher::class,"teacher_id","teacher_id");
    }
}